﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;

namespace MicroTest
{
    public partial class FrmPromot : Form
    {
        public FrmPromot()
        {
            InitializeComponent();
            threadTimer = new System.Threading.Timer(ShowMessage, null, Timeout.Infinite, 3000);

        }
        System.Threading.Timer threadTimer;
        public void SetPromptString(string sz)
        {
            labTip.Text = sz;
            threadTimer = new System.Threading.Timer(ShowMessage, null, 2000, 2000);

        }
        private void ShowMessage(object obj)
        {
            threadTimer.Change(Timeout.Infinite, 3000);
            this.Invoke(new Action(() => { this.Hide(); }));
            //this.Hide();
        }
    }

}
